package com.ky.gp.app.service;

import com.ky.common.param.AddressAdd;
import com.ky.common.vo.R;
import com.ky.gp.app.config.OpenFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "gp-course-server",configuration = OpenFeignConfig.class)
public interface AddressFeign {


    @RequestMapping("/course/address/getAddressByUserId")
    R getAddressList();

    @RequestMapping("/course/address/addAddress")
    R addAddress(@RequestBody AddressAdd addAddress);

    @RequestMapping("/course/address/updateAddress")
    R updateAddress(AddressAdd addressAdd);

    @RequestMapping("/course/address/deleteAddress")
    R deleteAddress(AddressAdd addressAdd);

    @RequestMapping("/course/address/getByAddressId")
    R getAddressByAddressId(@RequestParam("id") String id);

    @RequestMapping("/course/address/getDefaultAddress")
    R getdefaultAddress();
}
